<include file="./Tpl/Home/Header.html" />
<link href="/Public/Home/bootstrap.min.css?v=3.4.0" rel="stylesheet">
<script src="/Public/Home/jquery-2.1.1.min.js"></script>
<script src="/Public/Home/bootstrap.min.js?v=3.4.0"></script>
<!-- jQuery Validation plugin javascript-->
<script src="/Public/js/jquery.validate.min.js"></script>
<script src="/Public/js/messages_zh.min.js"></script>
<script src="/Public/js/base.js"></script>
<style type="text/css">
.user {
	width: 97%;
	margin: 0px auto;
}
.error{ color:#C00}
.user-nav {
}
.user-nav a {
	display: inline-block;
	float: left;
	padding: 7px 20px;
	margin-left: 10px;
	color: #0B72A4;
}
.user-nav a.cur {
	background: #fff;
	border: 1px solid #ddd;
	border-bottom: 0px;
}
.user-info {
	padding: 20px 0px;
	font-size: 14px;
	border: 1px solid #ddd;
}
.user-info dl {
	display: block;
	width: 99%;
	margin: 0px auto;
	zoom: 1;
	overflow: hidden;
}
.user-info dl dt, .user-info dl dd {
	float: left;
	padding: 15px 10px;
}
.user-info dl dt {
	clear: both;
	width: 10%;
}
.user-info dl dd {
	width: 70%;
}
.user-info dl dd input[type='radio'] {
	margin-left: 20px;
}
.user-info table {
	width: 100%;
	border: 1px solid #ccc;
	border-bottom: 0px;
}
.user-info th, .user-info td {
	padding: 10px 10px;
	border-bottom: 1px solid #ccc;
	text-align: right;
}
.user-info h3 {
	text-indent: 15px;
	padding: 15px 0px;
}
.sub {
	display: inline-block;
	font-weight: 700;
	font-size: 14px;
	color: white;
	text-align: center;
	width: 170px;
	height: 32px;
	line-height: 32px;
	background: #FF8C19;
	margin-top: 10px;
}
.sub:hover {
	color: #fff;
	text-decoration: none;
}
.tradeTitlecur{width:158px !important;}
.Tentitle span{background:none repeat scroll 0 0 #ffffff; border-left:1px solid #c3c1c1; border-right:1px solid #c3c1c1; border-top:2px solid #329ddc; color:#329ddc; padding:6px 10px 5px;}
</style>
<div class="marketArea clear"> <include file="./Tpl/Home/Left.html" />
  <div class="rightArea">
    <div class="entrustTen">
      <div class="Tentitle"> <span class="lightblue4">人民币提现</span> </div>
    </div>
    <div class="user-info"> 
      
      <!--新加-->
      <div style="display:block;" id="riskAreaDiv" class="riskArea"> <span class="icon"></span> <span class="hinttext"> <span class="define">{$art.content}</div>
      <!--新加-->
      <form class="form-horizontal m-t" id="tixian" jump-url="/Draw/add" method="post" action="/Draw/insert">
        <div class="form-group">
          <label class="col-sm-3 control-label">提现方式: </label>
          <div class="col-sm-8">
            <div class="col-sm-2">
              <p class="form-control-static">银行卡</p>
            </div>
            <div class="col-sm-2">
              <button type="button" class="btn btn-primary  btn-sm"data-toggle="modal" data-target="#myModal"> <notempty name='bank'> 修改<else/>添加</notempty>银行卡信息 </button>
            </div>
          </div>
        </div>
        <notempty name='bank'>
        <div class="form-group">
          <label class="col-sm-3 control-label">银行: </label>
          <div class="col-sm-3">
            <p class="form-control-static">{$bank.bankname}</p>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">收款人姓名: </label>
          <div class="col-sm-3">
            <p class="form-control-static">{$bank.cardname}</p>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">银行帐号: </label>
          <div class="col-sm-3">
            <p class="form-control-static">{$bank.cardnum}</p>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">开户行地址: </label>
          <div class="col-sm-3">
            <p class="form-control-static">{$bank.address}</p>
          </div>
        </div>
        </notempty>
		<eq name="draw" value="2">
        <div class="form-group">
          <label class="col-sm-3 control-label">可提现金额：</label>
          <div class="col-sm-8">
            <input name="num" class="form-control valid" placeholder="" type="text" aria-required="true" disabled="disabled" aria-invalid="false" value="￥{$auth.rmb|default='0'}">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">提现金额：</label>
          <div class="col-sm-8">
            <input name="num" class="form-control valid" placeholder="提现金额" type="text" aria-required="true" aria-invalid="false" value="">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">交易密码：</label>
          <div class="col-sm-8">
            <input name="password" class="form-control valid" placeholder="" type="password" aria-required="true" aria-invalid="false" value="">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">短信验证码：</label>
          <div class="col-sm-4">
            <input type="text" name="code" class="form-control valid" placeholder="请输入验证码">
          </div>
          <div class="col-sm-4">
            <input type="button" onclick="telsmg1()" id="tel1" class="form-control btn btn-info"  data-key='on' value="发送验证码">
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-3 col-sm-offset-3">
            <button class="btn  btn-block btn-primary" type="submit" id="submit-btn">提交</button>
          </div>
        </div>
		</eq>
		<eq name="draw" value="1">
		您于{$tixian.ctime|date="Y-m-d H:i:s",###}提现金额{$tixian.num}元,手续费为{$tixian.fee}元,
		正在审核中……
		
		</eq>
      </form>
    </div>
  </div>
</div>
</div>
<include file="./Tpl/Home/Footer.html" />
<div class="modal inmodal in" id="myModal" tabindex="-1" role="dialog"  aria-hidden="true">
  <div class="modal-dialog modal-lg modal-wrap" style="width:600px">
    <div class="modal-content animated bounceInLeft">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title">修改银行信息</h4>
        <div class="modal-body">
          <form class="form-horizontal m-t" id="bankform" jump-url="/?s=Home/Draw/add" method="post" action="/?s=Home/User/addBank">
            
            <notempty name='bank'><input name="id" type="hidden" value="{$bank.id}" /></notempty>
            <div class="form-group">
              <label class="col-sm-3 control-label">银行：</label>
              <div class="col-sm-8">
                <select class="form-control m-b" name="bankname">
                  <option value="-1">请选择银行类型</option>
				    <option value="支付宝">支付宝 </option>
                  <option value="工商银行">工商银行 </option>
                  <option value="农业银行">农业银行 </option>
                  <option value="建设银行">建设银行 </option>
      		        <option value="中国银行">中国银行 </option>
    			 <option value="邮政储汇">邮政储汇 </option>
				
                </select>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">银行卡账号：</label>
              <div class="col-sm-8">
                <input  name="cardnum" id="cardnum" class="form-control valid" placeholder="银行卡账号"  type="text" aria-required="true" aria-invalid="false"  >
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">再次输入账号：</label>
              <div class="col-sm-8">
                <input name="rcardnum" class="form-control valid" placeholder="再次输入银行卡账号" type="text" aria-required="true" aria-invalid="false"  value="">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">收款人姓名：</label>
              <div class="col-sm-8">
                <input  name="cardname" class="form-control valid" type="text" aria-required="true" aria-invalid="false" disabled="disabled" value="{$bank.cardname}">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">开户行地址：</label>
              <div class="col-sm-8">
                <input  name="address" class="form-control valid" placeholder="填写开户行地址" type="text" aria-required="true" aria-invalid="false" value="">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">短信验证码：</label>
              <div class="col-sm-4">
                <input type="text" name="code" class="form-control valid" placeholder="请输入验证码">
              </div>
              <div class="col-sm-4">
                <input type="button" onclick="telsmg3()" id="tel3" class="form-control btn btn-info"  data-key='on' value="发送验证码">
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-5 col-sm-offset-3">
                <button class="btn  btn-block btn-primary" type="submit" id="submit-btn">提交</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
				var i=120;
				var tid,tid2;
		tid2=setInterval(function(){
		if($("#tel3").attr("data-key")=='off'){
			$("#tel3").attr("disabled",true)
			i--;
			$("#tel3").val(i+"秒后可重新发送");	
			if(i<=0){
				$("#tel3").removeAttr("disabled").val("重新发送验证码");
				$("#tel3").attr("data-key","on");
			}
		}
	},1000);
	function telsmg3(){
		i=120;
		$("#tel3").attr("data-key","off");
		$.post("/?s=Home/User/tel",{"tel":""});
	}
		tid=setInterval(function(){
		if($("#tel1").attr("data-key")=='off'){
			$("#tel1").attr("disabled",true)
			i--;
			$("#tel1").val(i+"秒后可重新发送");	
			if(i<=0){
				$("#tel1").removeAttr("disabled").val("重新发送验证码");
				$("#tel1").attr("data-key","on");
			}
		}
	},1000);
	function telsmg1(){
		i=120;
		$("#tel1").attr("data-key","off");
		$.post("/?s=Home/User/tel",{"tel":""});
	}
		
		
</script> 
<script>	
           $("#bankform").validate({			   
                rules: {
                    bankname: {
                        required: true,
                    },
                    cardnum: {
                        required: true,
                    },
					  rcardnum: {
                        required: true,
                        equalTo:"#cardnum"
                    },

					address: {
                        required: true,
                    },
					code: {
                        required: true,
                        number:true
                    }
                },
                messages: {
                  bankname: {
                        required: "银行不能为空",
                    },
                    cardnum: {
                        required: '帐号不能为空',
                    },
					  rcardnum: {
                        required: '帐号不能为空',
                        equalTo:"两次帐号不相同"
                    },

					address: {
                        required: "开户行地址不能为空",
                    },
					code: {
                        required: "验证码不能为空",
                        number:'验证码必须是数字'
                    }
                },
				submitHandler:function(form){
					ajax_submit_form(form)
					return false;
				},
				invalidHandler: function() {  //不通过回调 
					  return false; 
				  },
		   
            });
			</script>
            <script>	
           $("#tixian").validate({			   
                rules: {
                    num: {
                        required: true,
						number:true
                    },
                    password: {
                        required: true,
                    },
					  code: {
                        required: true,
                     number:true
                    }
                },
                messages: {
                   num: {
                        required: "提现金额不能为空",
						number:"提现金额必须为数字"
                    },
                    password: {
                        required: "密码不能为空",
                    },
					  code: {
                         required: "验证码不能为空",
						number:"验证码必须是数字"
                    }
                },
				submitHandler:function(form){
					ajax_submit_form(form)
					return false;
				},
				invalidHandler: function() {  //不通过回调 
					  return false; 
				  },
		   
            });
			
			$(".items6").parent("li").addClass("cur");
			$(".bor").eq(1).children("div").addClass("tradeTitlecur").removeClass("tradeTitle");
			$(".bor").eq(1).find("span").addClass("acountManage1cur").removeClass("acountManage1");
	</script>